const path = require('path')
const __root__ = process.cwd()
const isProduction = process.env.NODE_ENV === 'production'

const baseRoot = 'public'
const publicPath = isProduction ? '/dist/' : '/'
const basePath = `${baseRoot}${publicPath}`
const indexOutput = `${baseRoot}/index.html`

module.exports = {
	PATHS: {
		src: path.join(__dirname, '..', 'src'),
		public: path.join(__root__, 'public'),
		output: path.join(__root__, basePath),
		assets(filename) {
			return path.posix.join('assets', filename)
		},
		resolve(dir) {
			return path.join(__dirname, '..', dir)
		},
		resolveSrc(dir) {
			return path.join(__dirname, '..', 'src', dir)
		},
	},

	publicPath,

	pathsToClean: [basePath],

	template: path.resolve(__root__, 'client/index.html'),

	index: path.resolve(__root__, indexOutput),

	cleanOptions: {
		root: __root__,
		// verbose: true, dry: false,
		// exclude: ['shared.js'],
		// verbose: true,
		// dry: false
	},

	dev: {

	},

	pro: {

	},

}